package org.codetranslators.compiler.tiger.abssyntree;

public class IfExp extends Exp {
   
	private Exp test;
	private Exp thenclause;
	private Exp elseclause; /* optional */
   
	public IfExp(int p, Exp x, Exp y) 
	{
		pos = p; 
		test = x; 
		thenclause = y; 
		elseclause = null;
	}
   
	public IfExp(int p, Exp x, Exp y, Exp z) 
	{
		pos = p; 
		test = x; 
		thenclause = y; 
		elseclause = z;
	}
	
	public Exp getTest()
	{
		return test;
	}
	
	public Exp getThenClause()
	{
		return thenclause;
	}
	
	public Exp getElseClause()
	{
		return elseclause;
	}
}
